package laschools.team1.Zelda;

import java.awt.Graphics;

import javax.swing.JPanel;

@SuppressWarnings("serial")
public class GamePanel extends JPanel{
	FrameTerrain terrain;
	static Graphics graphics;
	
	
	public GamePanel(){
		terrain = new FrameTerrain();
		graphics = this.getGraphics();
	}
	
	public void paint(Graphics g){
		FrameTerrain.drawTerrain(g, FrameMain.getScreen());
		int squareLength = FrameMain.getSquareLength();
		int linkX = (int) (Link.getPosition().x * squareLength);
		int linkY = (int) (Link.getPosition().y * squareLength);
		
		g.drawImage(Link.getLinkImage(), linkX, linkY, squareLength, squareLength, null);
	}
}
